﻿using Abp.Domain.Entities.Auditing;
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.Inspection
{
    /// <summary>
    /// 异常管理基础表
    /// </summary>
    public class InspectionStandardDesc : FullAuditedEntity<Guid>
    {
        /// <summary>
        /// 异常单号
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 任务编号
        /// </summary>
        public string TaskCode { get; set; }
        /// <summary>
        /// 任务编号Id
        /// </summary>
        public string TaskCodeId { get; set; }
        /// <summary>
        /// 一级异常ID
        /// </summary>
        public Guid InspectionTypeDescId { get; set; }
        /// <summary>
        /// 二级异常ID
        /// </summary>
        public Guid InspectionItemInfoId { get; set; }
        /// <summary>
        /// 异常描述
        /// </summary>
        public string InspectionDetails { get; set; }
        /// <summary>
        /// 异常等级ID
        /// </summary>
        public Guid InspectionSeverityDescId { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public States State { get; set; }
        /// <summary>
        /// 处理人Id
        /// </summary>
        [CanBeNull]
        public long? HandlerId { get; set; }
        /// <summary>
        /// 处理完成时间
        /// </summary>
        public DateTime? CompleteTime { get; set; }
        /// <summary>
        /// 原因分析
        /// </summary>
        public string CauseAnalysis { get; set; }
        /// <summary>
        /// 处理措施
        /// </summary>
        public string TreatmentMeasures { get; set; }
        /// <summary>
        /// 要求完成时间
        /// </summary>
        public string RequestCompleteTime { get; set; }
        /// <summary>
        /// 确认人ID
        /// </summary>
        public long? ConfirmerId{ get; set; }
        /// <summary>
        /// 确认时间
        /// </summary>
        public DateTime? ConfirmTime { get; set; }
        /// <summary>
        /// 确认意见
        /// </summary>
        public string ConfirmSuggest { get; set; }
        /// <summary>
        /// 耗费工时
        /// </summary>
        public string CostTime { get; set; }
        /// <summary>
        /// 原规程文件ID
        /// </summary>
        public string FileId { get; set; }
        /// <summary>
        /// 工艺编号
        /// </summary>
        public string TechniqueNumber { get; set; }
        /// <summary>
        /// 规程名称
        /// </summary>
        public string TechniqueName { get; set; }
        /// <summary>
        /// 原工序ID
        /// </summary>
        public Guid? ProcessId { get; set; }
        /// <summary>
        /// 工序图号
        /// </summary>
        public string ProcessesCode { get; set; }
        /// <summary>
        /// 工序名称
        /// </summary>
        public string ProcessesName { get; set; }
        /// <summary>
        /// 原工步ID
        /// </summary>
        public Guid? StepId { get; set; }
        /// <summary>
        /// 工步图号
        /// </summary>
        public string WorkStepCode { get; set; }
        /// <summary>
        /// 是否5G回传数据： 0：否 1：是
        /// </summary>
        public int IsReturn { get; set; }
    }
    public enum States
    {
        未处理 =0,
        处理中 = 1,
        已驳回 = 2,
        已完成 = 3,
        待确认 = 4
    }
}
